package com.example.demo.service.impl;

import com.example.demo.bean.Student;
import com.example.demo.mapper.StuMapper;
import com.example.demo.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestServiceImpl implements TestService {
  @Autowired
  private StuMapper stuMapper;

  @Override
  public int getData(int num) {
    return ++num;
  }

  @Override
  public List<Student> getAll() {
      List<Student> result = stuMapper.getAllStudent();
      return result;
  }
}
